function nodeList(arrOrObj) {
    let node=function (val,next) {
        this.val=val
        this.next=next
    }
    let head=new node(null,null)
    let cur=head
    for(let i of arrOrObj){
        cur.next= new node(i,null)
        cur=cur.next
    }
    return head.next
}
let node=function (val,next) {
    this.val=val
    this.next=next
}
export  {nodeList,node}